package com.adream.scalpel.app.client.service;

import java.util.ArrayList;

import com.adream.scalpel.common.client.vo.UserVO;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("UserManagement.rpc")
public interface UserManagement extends RemoteService {
    /**
     * Utility class for simplifying access to the instance of async service.
     */
    public static class Util {
        private static UserManagementAsync instance;

        public static UserManagementAsync getInstance() {
            if (instance == null) {
                instance = GWT.create(UserManagement.class);
            }
            return instance;
        }
    }

    void addUser(UserVO user);

    ArrayList<UserVO> searchUserByDisplayName(String userNameSearchString);

    void updateUser(UserVO user);
}
